home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_4 / lexcnv15.lha / Lexicon < prev    next >
Text File  |  1994-12-12  |  3KB  |  28 lines

  1. /**************************************************************************\
  2.         $VER: CNet Lexicon Interpreter, v1.5 (11-Dec-94) by Dotoran!
  3. \**************************************************************************/
  4. options results;tr=transmit;se=sendstring;gu=getuser;gc=getchar
  5.  
  6. colors= "6 e 9 a b"  /* Defines color of Lexicon Chart. See README! File  */
  7. uselex= "31"         /* Access Groups that will NOT use Lexicon. ""=ALL   */
  8.  
  9. parse arg asklex;gu 1302307;file=result;if file="?" then signal HELP;gu 2307386;df=result;gu 15;if index(' 'uselex' ',' 'result' ')>0&file="" then exit
  10. if asklex=0 then do;se 'cdLEX c6Check cbMessagec6? c7[caNoc7]c6: ca';gc;a=result;if a~='Y' then do;tr 'No.';exit;end;else tr 'Yes!';end
  11. gu 1;handle=result;gu 23;port=result;if (file=""|(~open(f1,file)&upper(file)~="UPLOAD"))&~exists(df'_edbuff'port) then exit
  12. parse var colors c1' 'c2' 'c3' 'c4' 'c5;if upper(file)="UPLOAD" then do;setprotocol "X";file=df'LexFile';XUP file;end
  13. if file>'' then loadeditor file;se 'cbAnalyzing cdMessagec6...';call open(f1,df'_edbuff'port,'r');call open(f2,df'unquote'port,'w')
  14. do i=1 until eof(f1);line=readln(f1);a=index(line,'>');if (a=0 | a>5) & eof(f1)=0 then call writeln(f2,line);end;call close(f2);call close(f1);totlines=i-1
  15. address command 'c:lex 'df'unquote'port' >'df'lexcheck'port;call open(f1,df'lexcheck'port,'r');do 3;j=readln(f1);end;do i=1 to 12;l.i=readln(f1);end i
  16. call close(f1);tr 'cfFinishedc6.n1';address command "delete "df"lexcheck"port" "df"unquote"port;if exists(df'LexFile') then address command "delete "df"LexFile"
  17. v1.1=word(l.1,5);v2.1=word(l.3,4);v3.1=word(l.4,8);v4.1=word(l.5,4);v5.1=strip(word(l.6,4),'t',',')
  18. v5.2=word(l.6,7);v6.1=word(l.7,3);v7.1=strip(word(l.8,3),'t',',');v7.2=word(l.8,7);v8.1=word(l.9,3)
  19. tr 'c'c1'Analyzedc'c3': c'c4||v1.1'c'c1' out of c'c4||totlines'c'c1' Total Lines.n1';tr 'c'c2'   Number of Words Analyzedc'c3': c'c5||v2.1
  20. tr 'c'c1'   Long Words(3+ Syllables)c'c3': c'c4||v3.1;tr 'c'c2'   Your Average Word Lengthc'c3': c'c5||v4.1' c'c2'Syllables.'
  21. tr 'c'c1'  Total Number of Sentencesc'c3': c'c4||v5.1;tr 'c'c2' Average Words Per Sentencec'c3': c'c5||v5.2'n1'
  22. tr 'c'c1'The Gunning-Fog Index Valuec'c3': c'c4||v6.1;tr 'c'c2'     The Flesch Index Valuec'c3': c'c5||v7.1;tr 'c'c1'     The Flesch Grade Levelc'c3': c'c4||v7.2
  23. tr 'c'c2'    The Kincaid Index Valuec'c3': c'c5||v8.1'n1';tr 'c'c1'     Could Be Understood Byc'c3': c'c4||l.12'n1';se '             c'c3'<c'c1'Tap c'c4'ENTER c'c1'Nowc'c3'>i1';exit
  24. HELP:;tr "n1ceCNet cbLexicon ceInterpretorc6, cfv1.5 c6by cdDotoranc6!n1";tr "c7Formatc9: caLEX cc<cdpathce/cdfilenamecc>>5c7(cbLOCAL c6Users/cfSysOps c9Onlyc9)n1"
  25. tr ">8caLEX cfUPLOAD>ec7(c6Send a cdtext file c6to the system, then have";tr ">f>f>3it cbLEX-Checkedc6. Uses caXModem cfProtocol c9Onlyc6!c7)"
  26. /** Last Edited: 11-Dec-94 ************************************************\
  27. \****************************************** FRONTIERS BBS (716)/823-9892 **/
  28.